So far, we have looked at first-order equations of the form \(\frac{dy}{dx} = f(x, y)\). Equations where \(\frac{dy}{dx} = f(x)\) can be solved by simple integration.
Definition: Separable Equation
An ODE \(\frac{dy}{dx} = f(x, y)\) is separable if \(f(x, y)\) can be expressed as a product of a function of \(x\) and a function of \(y\):
\[\frac{dy}{dx} = g(x) \cdot h(y)\]
Example: Find a general solution for \(\frac{dy}{dx} = -6xy\)
1. Separate the variables:
\[\frac{dy}{y} = -6x \, dx\]
2. Integrate both sides (assuming \(y \neq 0\)):
\[\int \frac{dy}{y} = \int -6x \, dx\]
\[\ln|y| = -3x^2 + C\]
3. Solve for \(y\):
\[|y| = e^C \cdot e^{-3x^2}\]
\[y = \pm e^C e^{-3x^2}\]
Let \(C' = \pm e^C\). Since \(e^C > 0\), initially we assume \(C' \neq 0\). The general solution is:
\[y = Ce^{-3x^2} \quad (C \neq 0)\]
Note: Is \(y = 0\) also a solution? If we plug \(y = 0\) into the ODE, we get \(0 = -6x(0)\), which is true. Therefore, \(y = 0\) is a solution (often called a "singular solution" or included in the general solution by allowing \(C=0\)).
Natural Growth and Decay
The equation for natural growth or decay is a classic separable ODE:
\[\frac{dx}{dt} = kx \quad \text{or} \quad \frac{dy}{dx} = ky\]
Example: Newton's Law of Cooling
Model the temperature \(T(t)\) of an object over time given:
- Ambient temperature \(A = 400^\circ\)
- Constant \(k = \frac{3}{2}\)
- Initial temperature \(T(0) = 60^\circ\)
Step 1: Set up the ODE
\[\frac{dT}{dt} = k(A - T) \implies \frac{dT}{dt} = \frac{3}{2}(400 - T)\]
Step 2: Separate and Integrate
\[\int \frac{dT}{400 - T} = \int \frac{3}{2} \, dt\]
\[-\ln|400 - T| = \frac{3}{2}t + C\]
Step 3: Solve for T
\[\ln|400 - T| = -\frac{3}{2}t - C\]
\[|400 - T| = e^{-C} e^{-\frac{3}{2}t}\]
\[400 - T = C e^{-\frac{3}{2}t}\]
\[T = 400 + C e^{-\frac{3}{2}t} \quad \text{(General Solution)}\]
Step 4: Solve for Particular Solution using \(T(0) = 60\)
\[60 = 400 + C e^{0}\]
\[60 = 400 + C \implies C = -340\]
Final Particular Solution:
\[T(t) = 400 - 340e^{-\frac{3}{2}t}\]
Example: Find an Implicit General and Particular Solution
Solve: \(\frac{dy}{dx} = \frac{4-2x}{3y^2-5}\) with initial condition \(y(1) = 3\).
1. Separate and Integrate:
\[\int (3y^2 - 5) \, dy = \int (4 - 2x) \, dx\]
\[y^3 - 5y + C_1 = 4x - x^2 + C_2\]
2. Implicit General Solution:
\[y^3 - 5y + x^2 - 4x = C\]
3. Find Particular Solution for \(y(1) = 3\):
Plug in \(x=1\) and \(y=3\):
\[3^3 - 5(3) + 1^2 - 4(1) = C\]
\[27 - 15 + 1 - 4 = 9 \implies C = 9\]
Final Particular Solution:
\[y^3 - 5y + x^2 - 4x = 9\]